package com.ubing.gxspringboot.gxcontroller;


import com.ubing.gxspringboot.gxannotation.GXAutowired;
import com.ubing.gxspringboot.gxannotation.GXRequestMapping;
import com.ubing.gxspringboot.gxannotation.GXRestController;
import com.ubing.gxspringboot.gxapplicationcontext.GXWebApplicationContext;
import com.ubing.gxspringboot.gxconfig.TestConfig;
import com.ubing.gxspringboot.gxservice.TestService;

@GXRestController
public class TestController {

    @GXAutowired
    TestService testServiceImpl;
    @GXRequestMapping("/test")
    public String test(String name){
        System.out.println("name::"+name);
//        gxWebApplicationContext.getBean("testConfig",TestConfig.class).test();
        String test = testServiceImpl.test();
        return test;
    }

    @GXAutowired
    GXWebApplicationContext gxWebApplicationContext;
    @GXRequestMapping("/test11")
    public String test(String name,String age){
        System.out.println("name::"+name);
        System.out.println("age::"+age);
        return testServiceImpl.test();
    }
}
